package com.jltx.storage.coroutinesdownloader


/**
 * @author jltxseo
 *         Created by junlintianxia on 2020/04/19.
 */
abstract class FileCallback<T> {
    /**
     * 开始订阅回调
     *
     * @param d
     */
    open fun onStart(tag: Any?) {}

    /**
     * 带Tag成功回调
     *
     * @param result
     */
    abstract fun onSuccess(tag: Any?, result: T)

    /**
     * 失败回调
     *
     * @param result
     */
    abstract fun onFailure(tag: Any?, result: T)

    /**
     * 当前进度回调
     *
     * @param result
     */
    open fun onLoading(tag: Any?, result: T) {}
}